#!/usr/bin/env python

import argparse
import sys
import os
#sys.path.append("/Users/roosevelt/Desktop/bayes/trunk/modules/")
sys.path.append("/home/roosevelt/Desktop/bayes/trunk/modules/")
from BayesNetwork import BayesNetwork

parser = argparse.ArgumentParser(description='Visualize a bayesian network.')
parser.add_argument('-p', help='The path to the BN to be visualized')
parser.add_argument('-o', help='The output file')

args = parser.parse_args()
BN = BayesNetwork()
BN.parse(vars(args)['p'])
BN.generateBNStructureVisualization(vars(args)['o'], BN.BayesianNetwork)
os.system('eog ' + vars(args)['o'] )

